package com.guigu.qingcheng.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
@EnableWebMvc
public class WebMvcConfig implements WebMvcConfigurer {

    @Value("${pathPage}")
    private String pagePath;

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/particulars/**").addResourceLocations("file:/D:/html/");
        registry.addResourceHandler("/**").addResourceLocations("classpath:/resources/", "classpath:/static/", "classpath:/templates/");
    }

}
